<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  
  <script>
    // 1.模板字符串的基本使用
    const name = "why";
    const age = 18;
    const message = `my name is ${name}`;

    // 2.标签模板字符串: 可以通过模板字符串的方式对一个函数进行调用
    function test(...args) {
      console.log(args);
    }

    // test("aaa", "ccc");

    // test`aaaa`;
    test`my name is ${name}, age is ${age}`;

    test`
      font-size: 15px;
      color: red;
    `
  </script>
</body>
</html>